/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Entidad;

import java.io.Serializable;
import java.util.List;
import javax.persistence.*;

/**
 *
 * @author usuario10
 */
@Entity
public class Movie implements Serializable {
    @Id
    private String name;
    private Integer yearOfCreation;
    private String cover;
    private String plotKeywords;
    private String genre;
    private Float rating;
    private Float duration;
    private Boolean availableForRental;
    private Boolean availabeForPurchase;
    @ManyToOne
    private Director director;
    @OneToOne
    private SoundTrack soundTrack;
    @ManyToMany(mappedBy="movies")
    private List<Actor> actors;

    public List<Actor> getActors() {
        return actors;
    }

    public void setActors(List<Actor> actors) {
        this.actors = actors;
    }

    public Boolean getAvailabeForPurchase() {
        return availabeForPurchase;
    }

    public void setAvailabeForPurchase(Boolean availabeForPurchase) {
        this.availabeForPurchase = availabeForPurchase;
    }

    public Boolean getAvailableForRental() {
        return availableForRental;
    }

    public void setAvailableForRental(Boolean availableForRental) {
        this.availableForRental = availableForRental;
    }

    public String getCover() {
        return cover;
    }

    public void setCover(String cover) {
        this.cover = cover;
    }

    public Director getDirector() {
        return director;
    }

    public void setDirector(Director director) {
        this.director = director;
    }

    public Float getDuration() {
        return duration;
    }

    public void setDuration(Float duration) {
        this.duration = duration;
    }

    public String getGenre() {
        return genre;
    }

    public void setGenre(String genre) {
        this.genre = genre;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPlotKeywords() {
        return plotKeywords;
    }

    public void setPlotKeywords(String plotKeywords) {
        this.plotKeywords = plotKeywords;
    }

    public Float getRating() {
        return rating;
    }

    public void setRating(Float rating) {
        this.rating = rating;
    }

    public SoundTrack getSoundTrack() {
        return soundTrack;
    }

    public void setSoundTrack(SoundTrack soundTrack) {
        this.soundTrack = soundTrack;
    }

    public Integer getYearOfCreation() {
        return yearOfCreation;
    }

    public void setYearOfCreation(Integer yearOfCreation) {
        this.yearOfCreation = yearOfCreation;
    }
}
